<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>行程</title>
    <!--semantic-ui-->
    <link href="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet">
    <link th:href="@{/qinjiang/css/qinstyle.css}" rel="stylesheet">
</head>
<body>

<!--主容器-->
<div class="ui container">

    <div th:replace="~{index::nav-menu}"></div>

    <div class="ui segment" style="text-align: center">
        <table>
            <thead>
            <tr>
                <th>id</th>
                <th>标题</th>
                <th>描述</th>
                <th>截止时间</th>
                <th>类型</th>
                <th>作者</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="matter : ${matters}">
                <td th:text="${matter.getMatterId()}"></td>
                <td th:text="${matter.getTitle()}"></td>
                <td th:text="${matter.getDescribes()}"></td>
                <td th:text="${#dates.format(matter.getDeadline(),'yyyy-MM-dd HH:mm:ss')}"></td>
                <td th:text="${matter.getTypes()}"></td>
                <td th:text="${matter.getAuthorId()}" style="display: none"></td>
                <td><span sec:authentication="name"></span></td>
                <td>
                    <a th:href="@{'/updateMatter/' + ${matter.getMatterId()}}" class="btn btn-sm btn-primary">编辑</a>
                    <a th:href="@{'/delMatter/' + ${matter.getMatterId()}}" class="btn btn-sm btn-danger">删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

</div>


<script th:src="@{/qinjiang/js/jquery-3.1.1.min.js}"></script>
<script th:src="@{/qinjiang/js/semantic.min.js}"></script>

</body>
</html>